﻿using QingZhouLinYe_Web.DbContext;
using QingZhouLinYe_Web.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace QingZhouLinYe_Web
{
    public partial class Index : LoginBasePage
    {
        private DbServices dbServices = new DbServices();
        public double pointX, pointY, mapLevel;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //userId = int.Parse(Request.QueryString["userId"]);
                try
                {
                    //定位地图中心
                    pointX = loginUser.FangHuoDanWei.CenterShape.X;
                    pointY = loginUser.FangHuoDanWei.CenterShape.Y;
                    mapLevel = loginUser.FangHuoDanWei.MapLevel;
                    Debug.WriteLine("user:" + loginUser.Name + "====" + loginUser.FangHuoDanWei.MingCheng);
                    String point = loginUser.FangHuoDanWei.CenterShape.ToString();
                    Debug.WriteLine(point);
                }
                catch
                {
                    Response.Redirect("Login.aspx");
                }
            }
        }

        protected void exitButton_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            Response.Redirect("Login.aspx");
        }


    }
}